<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01_BOM操作</title>
</head>
<body>
    <button onclick="alert('警告框')">弹出警告框</button>
    <button onclick="confirm('您确认要删除吗?')">弹出确认框</button>
    <button onclick="prompt('请输入您的会员卡号：')">弹出输入框</button>

<script>
    //将参数值转为整数
    console.log(parseInt(6.6));  //6
    console.log(parseInt(6.1));  //6
    console.log(parseInt(6));  //6
    console.log(parseInt('哈哈哈'));  //NaN
    console.log(parseInt('12h34hh5'));  //12

    //将参数值转为小数
    console.log(parseFloat('6.6'));  //6.6
    console.log(parseFloat('5'));  //5
    console.log(parseFloat('哈哈哈'));  //NaN
    console.log(parseFloat('11hh33h44'));  //11

    console.log(isNaN('hhh'));  //true
    console.log(isNaN(7));  //false
    console.log(isNaN(7.6));  //false

</script>
</body>
</html>